package com.oa.DaoImp;

import java.util.List;

import org.hibernate.Query;
import org.springframework.stereotype.Repository;

import com.oa.BaseDao.BaseDao;
import com.oa.DaoInter.OaButtonInter;
import com.oa.DaoInter.OaDutyInter;
import com.oa.DaoInter.RoleUserInter;
import com.oa.entity.OaButton;
import com.oa.entity.OaDuty;
import com.oa.entity.RoleUser;


@Repository 
public class OaDutyImp extends BaseDao implements OaDutyInter{
 
	

	public List<OaDuty> find() {
		return  getCurrentSession().createQuery("").list();
	}

	public boolean update(int id) {
		int num = getCurrentSession().createSQLQuery("").executeUpdate();
		if(num >= 0){
			return true;
		}else{
			return false;
		}
	}

	public void save(OaDuty user) {
		getCurrentSession().save(user); 
		
	}

}
